package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.pojo.dto.HistorySearchDto;
import com.zhentao.service.ApUserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/history")
public class ApUserSearchController {
   //http://localhost:8801/app/search/api/v1/history/load/
 //localhost:8801/app/search/api/v1/history/load/

    @Autowired
    private ApUserSearchService apUserSearchService;
    @PostMapping("/load")
    public ResponseResult findUserSearch(){
        return apUserSearchService.findUserSearch("4");
    }

    @PostMapping("/del")
    public ResponseResult delUserSearch(@RequestBody HistorySearchDto historySearchDto) {
        return apUserSearchService.delUserSearch(historySearchDto);
    }
}
